package fr.uniscol.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

@Controller
public class HomeController extends UniscolRootController {

	/*@Autowired
	private UserManagerDao userManagerDao; 
	*/
	/*@RequestMapping(value = "*", method = RequestMethod.GET)
	public String home(HttpServletRequest request, Model model){
		
		System.out.println("Home..");
		
		ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(request.getServletContext());
		System.out.println(applicationContext.getBeanDefinitionNames()[0]);
		
		return "Hello";
	}*/
	/*
	@RequestMapping(value = "/modifier.action", method = RequestMethod.POST)
	public String connexion(String login, String password,  Model model){
		
		System.out.println("Connexion: " + login + "/" + password);
		
		String reponse = userManagerDao.connection(login, password);
		
		model.addAttribute("reponse", reponse);
		
		return "Hello";
	}*/
}
